Skip to content

Manipulation of Trees #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Manipulation of Trees #16

wants to merge 7 commits into from

Conversation

Ryo-wtnb11
Copy link
Collaborator

@Ryo-wtnb11 Ryo-wtnb11 commented May 11, 2025

This PR includes the structural manipulation of a given tree as follows:

  • swap_2site(g::NamedGraph, vs::Pair{Int, Int}): swap 2 site-tensors which are specified by vs.
  • add_subtree(g::NamedGraph, v::Int, edge::NamedEdge): add (connect) a subtree, that is the partition not including v, on (with) the vertex v.

@Ryo-wtnb11
Copy link
Collaborator Author

This PR does structural searchs for reasonable TTN. We can try the crossinterpolate function of the version including the structural search.

function crossinterpolate_adaptivetree(
    ::Type{ValueType},
    f,
    localdims::Union{Vector{Int},NTuple{N,Int}},
    g::NamedGraph,
    nsearch:: Int = 10,
    initialpivots::Vector{MultiIndex} = [ones(Int, length(localdims))];
    kwargs...,
) where {ValueType,N}

The variable of nsearch is the number of structural searches that will be conducted.
This only changes the TTN structure by swapping the local two tensors so far. However you can find another proposer in newstractureproposer.jl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant